<script setup lang="ts">
import { computed, ref } from 'vue';
import EducationCardItem from './EducationCardItem.vue';
import { useResumeStore } from '@/stores/ResumeStore';
import { storeToRefs } from 'pinia';

const resumeStore = useResumeStore();
const { resume } = storeToRefs(resumeStore);

import logo from '@/assets/img/college/SCAU.png';

const education = ref([
  {
    college: '四川农业大学',
    collegeLogo: logo,
    course: '全日制本科-生态学-理学学位',
    start: '2015-09',
    end: '2019-06',
    url: 'https://www.sicau.edu.cn/',
  },
]);

const total = computed(() => {
  return education.value.length;
});
</script>

<template>
  <div class="card">
    <h2 class="mb-5 text-lg font-semibold dark:text-night-50">教育经历</h2>

    <EducationCardItem v-for="(item, index) in education" :key="index" :item="item" :separator="total > index + 1" />
  </div>
</template>
